/* visualizer/src/App.css - 增强版本 */
.App {
  text-align: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  min-height: 100vh;
  color: white;
  padding: 20px;
}

.App-header {
  margin-bottom: 30px;
}

.App-header h1 {
  color: #e94560;
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.App-header p {
  color: #0fccce;
  font-size: 1.2rem;
  margin: 0;
}

/* 控制面板 */
.controls-panel {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 120px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.btn-primary {
  background: #4cc9f0;
  color: white;
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-secondary {
  background: #6b7280;
  color: white;
}

/* 仪表板布局 */
.dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.status-panel {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-panel h2 {
  color: #0fccce;
  margin-bottom: 15px;
  border-bottom: 2px solid #0fccce;
  padding-bottom: 5px;
}

/* 状态网格 */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
}

.status-item {
  background: rgba(255, 255, 255, 0.15);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.status-value {
  font-size: 1.5em;
  font-weight: bold;
  margin: 5px 0;
}

.performance-good { color: #4ade80; }
.performance-medium { color: #f59e0b; }
.performance-poor { color: #ef4444; }

/* 因子面板 */
.factors-panel {
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.factors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.factor-card {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-left: 4px solid #4cc9f0;
}

.factor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.factor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.factor-name {
  font-weight: bold;
  font-size: 1.1em;
  color: #e94560;
}

.factor-type {
  background: #4cc9f0;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  color: white;
}

.health-bar {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  height: 8px;
  margin: 5px 0;
  overflow: hidden;
}

.health-fill {
  background: linear-gradient(90deg, #e94560, #0fccce);
  height: 100%;
  transition: width 0.3s ease;
  border-radius: 5px;
}

/* 图表容器 */
.charts-container {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.chart-panel {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.chart-panel h3 {
  color: #0fccce;
  margin-bottom: 15px;
}

.chart-placeholder {
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 2px dashed rgba(255, 255, 255, 0.2);
}

/* 日志面板 */
.logs-panel {
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.log-output {
  height: 200px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  text-align: left;
}

.log-entry {
  margin: 5px 0;
  padding: 5px;
  border-left: 3px solid #4cc9f0;
  background: rgba(255,255,255,0.05);
}

.log-time {
  color: #4ade80;
  font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  
  .factors-grid {
    grid-template-columns: 1fr;
  }
  
  .charts-container {
    grid-template-columns: 1fr;
  }
  
  .controls-panel {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 200px;
  }
}

/* 添加进度信息样式 */
.progress-info {
  text-align: center;
}

.progress-info > div {
  margin: 10px 0;
}

.progress-bar {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  height: 20px;
  margin: 10px 0;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, #e94560, #0fccce);
  height: 100%;
  transition: width 0.3s ease;
  border-radius: 10px;
}

/* 按钮禁用状态 */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}